@extends('front.common.header')

@section('title',$arr->title.' - 青苜社区')

@section('head')
@parent
@stop

@section('content')
@include('front.common.editor')
<link href="{{ asset('/css/employ/list.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/bbs/index.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/company/jobs.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/company/comdetails.css') }}" rel="stylesheet" type="text/css">
<script type="text/javascript">
    bbseditorInit();
</script>
<div class="main">
    <div class="content">
        <div class='top-nav'>
            <ul>
                {!! $mianbaoxie !!}
            </ul>
        </div>
    </div>
    <div class="employ-list">
        <div class="employ-list-left fl">
            <div class="employ-search mb20">
                <div class="employ-info employ-tags">
                </div>
                <div class="employ-info employ-title mt-20">
                    {{-- <span>{{$categoryName->title}}</span>
                    <span>：</span>--}}
                    <span>{{$arr->title}}</span>
                </div>
                <div class="employ-info">
                    <div class="employ-info-ext fl">
                        <div class="user-info-avatar fl cp" @if(empty($authuser)) onclick="loginTips()" @elseif($authuser->id == $arr->publish_uid ) onclick="messageTips()" @else onclick="message('/message?ruid={{$arr->publish_uid}}','{{ csrf_token() }}')" @endif>
                            <img src=" {{ userlogo($arr->publish_uid,'small') }}" width="40" style="border-radius:20px;">
                        </div>
                        <div class="user-info-uname ml-20 fl cp" @if(empty($authuser)) onclick="loginTips()" @elseif($authuser->id == $arr->publish_uid ) onclick="messageTips()" @else onclick="message('/message?ruid={{$arr->publish_uid}}','{{ csrf_token() }}')" @endif>{{getUserName($arr->publish_uid)}}</div>
                        <div class="user-info-createtime ml-20 fl">发表于:{{$arr->created_at}}</div>
                        <div class="user-info-createtime ml-10 fl">|</div>
                        <div class="dropdown user-info-createtime ml-10 fl">
                         <form action="{{url('/reports')}}" method="POST" onsubmit="return checkParam('{{empty($authuser)?0:1}}',this)">
                            {{csrf_field()}}
                           <input type="hidden" name="app" value="bbs_question">
                           <input type="hidden" name="app_id" value="{{$arr->id}}">
                           <input type="hidden" name="app_url" value="{{Request::getRequestUri()}}">
                           <input type="hidden" name="report_type" value="1">
                           <a href="javascript:void(0)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 举报<span class="caret"></span></a>
                           <ul class="dropdown-menu" aria-labelledby="dLabel">
                            <li><button type="submit">个人信息举报</button></li>
                            <li><button type="submit" onclick="$('input[name=report_type]').val(2);">垃圾信息举报</button></li>
                           </ul>
                         </form>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="employ-info-ext fl">
                        <ul>
                            <li class="color-orange">
                                <img src="{{ asset('/images/front/jiuyezhinan/view.png') }}" title="浏览">
                                {{count($arr->view_count)>0?$arr->view_count:0}}
                            </li>
                            <li class="color-orange">
                                <img src="{{ asset('/images/front/jiuyezhinan/pl.png') }}" title="评论">
                                {{count($arr->comment_count)>0?$arr->answer_count:0}}
                            </li>
                            @if(empty($arr->is_collect) || $arr->is_collect == 0)
                            <li class="color-gray" id="collect_num">
                                <a onclick="toCollect('/member/collect','bbs','{{$arr->id}}','{{ csrf_token()}}','{{empty($authuser)?0:$authuser->id}}')">
                                    <img src="{{ asset('/images/front/heart-no.png') }}" title="收藏" >&nbsp;&nbsp;
                                </a>
                                    <span class="color-gray">{{ $arr->focus_count }}</span>
                                
                            </li>
                            @else
                            <li class="color-gray" id="collect_num">
                                <img src="{{ asset('/images/front/jiuyezhinan/red-heart.png') }}" title="收藏">&nbsp;&nbsp;
                                <span>{{ $arr->focus_count }}</span>
                            </li>
                            @endif
                            <li class="small">|</li>
                            <div class="bdsharebuttonbox"><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a></div>
                            <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["qzone","tsina","weixin","douban"],"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                            <div class="clearfix"></div>
                        </ul>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="employ-info text-left bodertop-213 margin-top-10">
                    <div class="mt-25">
                        {!!$arr->detail!!}
                    </div>
                </div>
                <div class="employ-info">
                  <div class="nice-point">
                    <a href="javacript:void(0)" @if(empty($authuser))onclick="loginTips()" @else onclick="toBbsApprove('/bbs/praise','{{$arr->id}}','{{ csrf_token()}}')" @endif>
                        <img src="{{ asset('/images/front/jiuyezhinan/good.png') }}"></a>
                    <div class="nice-point-count" id="nice-point-count">
                        {{count($arr->thanks_count)>0?$arr->thanks_count:0}}
                    </div>
                </div>
        </div>
            </div>
            <div id="com-comments-list">
                <h4 class="c0 pt15 pb15 pl20 ma0">全部评论</h4>
                <div id="itemContainer" >
                    @foreach($BbsAnswerComment as $k=>$vo)
                    <div class="comment-common" id="comment-common{{$k}}">
                        <div class="comment-user-avatar fl pt10 cp" @if(empty($authuser)) onclick="loginTips()" @elseif($authuser->id == $vo->user_id ) onclick="messageTips()" @else onclick="message('/message?ruid={{$vo->user_id}}','{{ csrf_token() }}')" @endif>
                            <img src="{{userlogo($vo->user_id,'middle')}}">
                        </div>
                        <div class="comment-main fl">
                            <div class="comment-content text-left">
                                <p class="font-20 c3">{{getUserName($vo->user_id)}}</p>
                                <p class="fs14 c5">{!!$vo->title!!}</p>
                                <div class="fs14 c9 ma0">
                                    <div class="fl">
                                        {{$vo->created_at}}&nbsp;&nbsp;&nbsp;&nbsp;
                                        <a href="javascript:;" onclick="showreply({{$vo->id}})">回复</a>
                                    </div>
                                    <div class="fr mr15">
                                        <img src="{{ asset('/images/front/jiuyezhinan/pl.png') }}">
                                        @if(count($vo->getAnswerComment)>0)
                                        <input type="text" name="totalnum{{$vo->id}}" value="{{count($vo->getAnswerComment)}}" readonly="readonly">
                                        @else
                                        <input type="text" name="totalnum{{$vo->id}}" value="0" readonly="readonly">
                                        @endif
                                    </div>
                                    <div class="clr"></div>
                                </div>
                            </div>
                            <div id="comment-reply{{$vo->id}}" class="comment-reply-form mt20 dn">
                                <div class="comment-reply-form-b">
                                    <textarea id="comment-reply-content{{$vo->id}}" class="fl" placeholder="人可以走,留下你的态度"></textarea>
                                    <button type="button" id="submit{{$vo->id}}" class="fr" @if(empty($authuser))onclick="loginTips()" @else onclick="bbsChildcom('/comment/push?typeid=4','1','{{$vo->id}}','{{csrf_token()}}')" @endif>发表回复</button>
                                </div>
                            </div>
                            <div id="message{{$vo->id}}" class="commentmsg dn"></div>
                            <div class="comment-child text-left" id="comment-childs{{$vo->id}}">
                                @if(count($vo->getAnswerComment)>0)
                                <div class="comment-caret-up"><i class="glyphicon glyphicon-triangle-top"></i></div>
                                <div class="comment-child-content" id="comment-child-content{{$vo->id}}">
                                    @foreach($vo->getAnswerComment as $key=>$zn)
                                    @if($key<3)
                                    <div class="comment-child-content-list" >
                                        <p class="fs18 color-green">{{getUserName($zn->user_id)}}：</p>
                                        <p class="fs14 c5">{{$zn->message}}</p>
                                    </div>
                                    @endif
                                    @endforeach
                                </div>
                                @endif
                            </div>
                        </div>
                        <div class="clr"></div>
                    </div>
                    @endforeach
                </div>
                {{-- 分页 --}}
                <div id="holder" @if(count($BbsAnswerComment)== 0) class="holder dn" @else class="holder" @endif></div>
                <script>
                jPages();
                </script>
                <div class="comment-reply-main">
<!--                  <textarea id="comment-reply-content" placeholder="人可以走,留下你的态度"></textarea>-->
                  <textarea id="comment-reply-content" placeholder="人可以走,留下你的态度"></textarea>
                  <div class="mb20 lh44 mt10">
                    <div id="message" class="fl"></div>
                    <button type="button" class="fr" id="submit-main" @if(empty($authuser))onclick="loginTips()" @else onclick="bbscomment('/comment/push?typeid=4','0','{{$arr->id}}','{{$categoryName->id}}','{{ csrf_token() }}')" @endif>发表回复</button>
                  </div>
                </div>
            </div>
        </div>
        <div class="employ-list-right fl">
            <div class="employ-list-tips">
               <div class="tips-title" style="border-bottom:none;">人气热点</div>
             @foreach($question as $vo)
               <div class="tips-content " style="border-bottom:1px solid #f6f6f6">
                   <div class="tips-content-main">
                       <div class="tips-content-title">
                           <a href="{{url('/bbs/'.$vo->id)}}">
                               {!!str_limit($vo->title,22)!!}
                           </a>
                       </div>
                       <div class="tips-content-views">阅读（{{$vo->view_count}}）</div>
                   </div>
               </div>
             @endforeach
           </div>
            <div class="bbs-plate-new">
                <div class="font-18 color-15 hot-bbs-tit bbs-div-ti-border">热门板块</div>
                <ul class="clearfix">
                    @foreach($hotbbs as $ke=>$vo)
                    <li class="@if($ke%2 == 0) border_r_b @else border_b @endif">
                        <a href="{{url('/bbs/board/'.$vo->id)}}">{{str_limit($vo->title,10)}}</a>
                    </li>
                    @endforeach
                </ul>
            </div>
            <div class="employ-list-tips">
               <div class="tips-title" style="border-bottom:none;">热门精华</div>
               @foreach($hotemploy as $key=>$hote)
               <div class="tips-content " style="border-bottom:1px solid #f6f6f6;height: 55px;">
                   <div class="tips-content-main">
                      <div class="tips-content-title">
                        <a href="{{ url('/employ/'.$hote->id) }}" title="{{$hote->title}}">
                            {{str_limit($hote->title,22)}}
                        </a>
                      </div>
                   </div>
               </div>
               @endforeach
            </div>
            <div class="employ-list-tips" style="margin-top: 20px;">
            <div class="tips-title" style="border-bottom:none;">热门课程</div>
                @foreach($hotteaches as $key=>$hott)
                <div class="tips-content " style="border-bottom:1px solid #f6f6f6; height: 55px;">
                  <div class="tips-content-main">
                    <div class="tips-content-title">
                      <a href="{{url('/teaches/'.$hott->id)}}" title="{{$hott->name}}">
                       {{str_limit($hott->name,22)}}
                      </a>
                    </div>
                  </div>
                </div>
               @endforeach
            </div>
           @foreach ($ads_img as $key => $adimg)
	       <div class="employ-list-tips mt-10">
	           <img src="{{$adimg->attachment($adimg->id)->url}}">
	       </div>
	       @endforeach
        </div>
        <div class="clr"></div>
    </div>
</div>
@stop

<!--底部导航-->
@section('footer')
@parent
@stop

